Some computer programming languages include a concept known as closure. Closure is a way of capturing environmental elements, such as program variables, for subsequent use even though the original elements may have changed or no longer exist. For example, an inner function may refer to local variables defined within an outer function. The inner function may be assigned to a variable and invoked. Conceptually, the variables referred to by the inner function may be saved at the time of assignment, and these saved variables may be used during a subsequent invocation of the inner function. An implementation may save the variables in allocated heap memory, and deallocate the heap memory when it is no longer needed. Multiple invocations of the inner function reference the same copy of the saved variables. The inner function that refers to a local variable of the outer function is referred to as a lambda function, or simply, a lambda.